package com.hzit.auth.client;


import com.hzit.common.util.R;
import com.hzit.common.util.User;
import com.hzit.auth.client.factory.HzitFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value="hzit-user",fallbackFactory = HzitFallbackFactory.class)
public interface UserClient {

	//1. 根据用户名查询用户
	@GetMapping("/user/findUserByUsername")
	R<User> findUserByUsername(@RequestParam("username") String username);
	//2. 根据用户名查询权限列表
	@GetMapping("/user/findPermissionsByUsername")
	R<List<String>> findPermissionsByUsername(@RequestParam("username") String username);
}
